package com.doubao.doubao_admin.controller;

import com.doubao.doubao_admin.common.Result;
import com.doubao.doubao_admin.model.entity.BmsTip;
import com.doubao.doubao_admin.service.cService.BmsTipService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/tip")
public class BmsTipController extends BaseController {

    @Resource
    private BmsTipService bmsTipService;
    @GetMapping("/today")
    @ResponseBody
    public Result<BmsTip> getNotices(){

        BmsTip bmsTip = bmsTipService.getRandomTip();
        return Result.success(bmsTip);
    }
}
